<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/admin/imgs/logo.ico"/>
    <link rel="Shortcut Icon" href="/admin/imgs/logo.ico"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
    <title>大会后台</title>
    <style type="text/css">
        .td { min-width: 50px; }
        .req { max-width: 300px; overflow: auto; }
    </style>

    <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="js/admin.js"></script>
    <script type="text/javascript">
        var info = getLoginInfo();
        (function(){
            if (!info) {
                window.location.href = 'login.html';
            }
        })();
    </script>
</head>
<body>
    <nav class="breadcrumb">
        <i class="Hui-iconfont"></i> 
        <a href="main.html" class="maincolor">首页</a> 
        <span class="c-999 en">&gt;</span>
        <span class="c-666">主页</span> 
    </nav>
    <!--<h4>这里是首页</h4>-->
    <div class="Hui-article">
        <article class="cl pd-20">
            <table class="table table-border table-bordered table-bg">
                <thead>
                <tr>
                    <th colspan="7" scope="col">统计</th>
                </tr>
                <tr class="text-c">
                    <th>序号</th>
                    <th>用户终端</th>
                    <th>时间</th>
                </tr>
                </thead>
                <tbody>
                <!--<tr class="text-c">-->
                    <!--<td>1周内</td>-->
                    <!--<td class="td" id="weekUser" onclick="toUser()">2</td>-->
                    <!--<td class="td" id="weekQue" onclick="toQue()">0</td>-->
                    <!--<td class="td" id="weekAnswer" onclick="toAnswer()">0</td>-->
                <!--</tr>-->
                <!--<tr class="text-c">-->
                    <!--<td>总数</td>-->
                    <!--<td class="td" id="totalUser" onclick="toUser()">92</td>-->
                    <!--<td class="td" id="totalQue" onclick="toQue()">9</td>-->
                    <!--<td class="td" id="totalAnswer" onclick="toAnswer()">9</td>-->
                <!--</tr>-->
                </tbody>
            </table>
        </article>
        <footer class="footer">
            <p> Copyright &copy;2022 <br> 本后台系统由 <a href="javascript:;" target="_blank"> 佰傲嘉 </a> 提供技术支持</p>
        </footer>
    </div>
</body>
</html>


<script type="text/javascript">
    (function(){
        getTongji();
    })();
    function getTongji(){
        var formData = {};
        $.ajax({
            type: 'post',
            url: domain+'tongji',
            data: formData,
            success: function (res) {
                res = JSON.parse(res);
                console.log(res);
                if (res.code!=0) {
                    console.log(res.msg); return
                }
                var d = res.data;
                var h = '', i;
                for (i=0; i<d.length; i++) {
                    h += '<tr class="text-c">';
                    h += '<td class="td">'+(i+1)+'</td>';
                    h += '<td class="td req">'+d[i].req+'</td>';
                    h += '<td class="td">'+d[i].addtime+'</td>';
                    h += '</tr>';
                }
                $('tbody').html(h);
            },
            error: function () {
                console.log('网络错误');
            }
        });
    }
</script>